package twi.result;

import com.hp.hpl.jena.query.ResultSet;

import twi.query.Query;
import twi.result.graph.GraphFactory;
import twi.result.graph.RGraph;
import twi.result.table.RTable;

public class DefaultResult implements QueryResult{

	
	RGraph graph = null;
	RTable table = null;
	
	public DefaultResult(Query qr, ResultSet rs){
		this.table = new RTable(rs, qr);
		this.graph = GraphFactory.createGraph(table);
	}
	@Override
	public RGraph asGraph() {
		return graph;
	}

	@Override
	public RTable asTable() {
		return table;
	}

}
